-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0] Add printing_auto_base #310
base: 14.0
Are you sure you want to change the base?
Conversation
0e4357b
to
0202c43
Compare
4f0bba8
to
58bb18d
Compare
@mt-software-de I finished the refactor. Looks better now. |
58bb18d
to
9f047d5
Compare
9f047d5
to
4ba3297
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The attachment field must be changed in the view and test to attachment_domain :-)
55daad4
to
9d3afab
Compare
Merged |
629569b
to
fdb2477
Compare
Changes:
|
Could you let me know when your are done with your changes? |
e0be80e
to
c14ee68
Compare
@jbaudoux what will happen with this PR, since OCA/stock-logistics-reporting#347 is merged? |
@mt-software-de We should get this merged, this is more generic than the other. @sebalix Can you reopen it? |
Should |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Beside the one test
|
||
|
||
@mock.patch.object(PrintingPrinter, "print_document", print_document) | ||
@mock.patch.object(logging.Logger, "exception", exception) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should not be needed at all, since print_document is mocked.
@jbaudoux Yes, it makes sense. |
42b597b
to
e645555
Compare
Select on printing.auto to log or raise errors
Fix same record printed multiple times
e645555
to
221d2f8
Compare
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
from odoo.exceptions import UserError, ValidationError | ||
|
||
from .common import PrintingPrinter, TestPrintingAutoCommon, print_document | ||
from .model_test import PrintingAutoTester, PrintingAutoTesterChild, setup_test_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbaudoux any reason not to use odoo_test_helper
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing out that. I replaced it with your suggestion
cc @TDu
def _check_data_source(self): | ||
for rec in self: | ||
if rec.data_source == "report" and not rec.report_id: | ||
raise UserError(_("Report is not set")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constrains should raise ValidaitonError
c999790
to
e5b0dee
Compare
When a picking is done, automatically trigger the printing of some documents.
This can be used to print a delivery slip (report) or labels received from the carrier (attachment).
cc @sebalix @mt-software-de